package net.joyphper.commons;

import net.joyphper.commons.encry.EncryMD5;
import net.joyphper.commons.encry.EncrySHA1;

public class Encrypt {
	/**
	 * 获取MD5加密后的字符，算法不可以逆
	 * 
	 * @param str
	 * @return
	 */
	public static String md5(String str) {
		return new EncryMD5().getMD5ofStr(str);
	}

	/**
	 * 获取SHA1加密后的字符，算法不可以逆
	 * 
	 * @param str
	 * @return
	 */
	public static String sha1(String str) {
		return new EncrySHA1().getDigestOfString(str.getBytes());
	}

	public static void main(String[] args) throws Exception {
		System.out.println(Encrypt.md5("stjdydayou@163.comD033E22AE348AEB5660FC2140AEC35850C4DA997"));
	}
}
